#ifndef __TWNEXEMOV
#define __TWNEXEMOV	1

#ifdef ALONE_TWN_MOV_EXEC
#include <stdio.h>

#include "ApmsApi.h"
#include "ApmsUtility.h"
#include "Tianwan.h"
#include "Uti_Tianwan.h"
#include "Mov_Tianwan.h"
#include "XlsObj.h"
#include "Twn_TNTBuilder.h"
 
#define API_SERVER  extern "C" __declspec(dllexport)
#else
#define API_SERVER  extern "C" __declspec(dllimport)
#endif

int			EXM_Err;
TCHAR		EXM_LogMsg[128];
TCHAR		EXM_LogPath[128] = _T("C:\\Programmi\\ABB Industrial IT\\Power Generation Portal\\Logs\\PPH_log.txt");
BOOL		EXM_LogActive = true;
BOOL		EXM_MsgBoxActive = false;

#define		EXM_ERR_CODE(ErrCode)	ErrCode + 5000

API_SERVER PHASTAT Exec_Seq (	int Code, 
								GENIDX ObjectIdx, 
								GENIDX ObjtIdx, 
								GENIDX ZoneIdx,
								short int VCoo_X, 
								short int VCoo_Y, 
								OBJTCELL *ObjtCell,
								OBJTMM *ObjtMast);
API_SERVER PHASTAT Exec_Seq_xy(MIC_CMDNAME MicroCmdName, float CoordX, float CoordY);
API_SERVER PHASTAT Exec_Seq_TV(float angleRange);
API_SERVER PHASTAT Exec_Seq_TV_Insp();
API_SERVER RETSTAT MiceOptimizer(int phase);
API_SERVER RETSTAT SetMiceTCInfo(int startOp, int stopOp, GENIDX tecCycIdx, int seqNum);
API_SERVER PHASTAT Exec_Seq_DCI(short int svx, short int svy);
API_SERVER PHASTAT Exec_Seq_DMP(short int svx, short int svy);
API_SERVER PHASTAT Exec_Seq_Displ(short int svx, short int svy);
API_SERVER	int EXM_LogFileWrite(TCHAR cmd[4], TCHAR *Comment, int errNum);
API_SERVER	int EXM_ActivateLog(void);
API_SERVER	int EXM_DeactivateLog(void);
API_SERVER	int EXM_ActivateMsgBox(void);
API_SERVER	int EXM_DeactivateMsgBox(void);
API_SERVER	int EXM_SetLogPath(TCHAR *path);
#endif